﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace ConsoleTest.Code
{
    public class Dict
    {
        public string Name { get; set; }
        public object Val { get; set; }
    }
    public class DictCollection : Collection<Dict>
    {
        public DictCollection() { }
        //public DictCollection(List<Dict> list)
        //{
        //    foreach (var item in list)
        //    {
        //        this.Add(item);
        //    }
        //}
        public string Test()
        {
            return this.Where(p => p.Name.Contains("t")).Aggregate((p1, p2) =>
               {
                   return new Dict() { Name = p1.Name + "," + p2.Name };
               }).Name;
        }
    }
    public class DictDictionary : IDictionary<string, Dict>
    {

        public void Add(string key, Dict value)
        {
            throw new NotImplementedException();
        }

        public bool ContainsKey(string key)
        {
            throw new NotImplementedException();
        }

        public ICollection<string> Keys
        {
            get { throw new NotImplementedException(); }
        }

        public bool Remove(string key)
        {
            throw new NotImplementedException();
        }

        public bool TryGetValue(string key, out Dict value)
        {
            throw new NotImplementedException();
        }

        public ICollection<Dict> Values
        {
            get { throw new NotImplementedException(); }
        }

        public Dict this[string key]
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public void Add(KeyValuePair<string, Dict> item)
        {
            throw new NotImplementedException();
        }

        public void Clear()
        {
            throw new NotImplementedException();
        }

        public bool Contains(KeyValuePair<string, Dict> item)
        {
            throw new NotImplementedException();
        }

        public void CopyTo(KeyValuePair<string, Dict>[] array, int arrayIndex)
        {
            throw new NotImplementedException();
        }

        public int Count
        {
            get { throw new NotImplementedException(); }
        }

        public bool IsReadOnly
        {
            get { throw new NotImplementedException(); }
        }

        public bool Remove(KeyValuePair<string, Dict> item)
        {
            throw new NotImplementedException();
        }

        public IEnumerator<KeyValuePair<string, Dict>> GetEnumerator()
        {
            throw new NotImplementedException();
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            throw new NotImplementedException();
        }
    }
}
